@extends('admin::layouts.master')

@section('content')
    <div class="col-lg-12">
        <div class="card card-table">
            <div class="card-header">模板管理</div>
            <div class="table-container">
                <div class="card card-contrast card-border-color-success">
                    @foreach($template as $v)
                        <div class="card-body col-sm-3" style="float: left;text-align: center;background-color: white">
                            <img src="{{$v['preview']}}" style="width:100%;height: 200px">
                            <p>名称：{{$v['name']}}</p>
                            <p>作者：{{$v['author']}}</p>
                            {{--\HDModule::config('admin.config.name')获取配置方法--}}
                            @if(\HDModule::config('admin.config.template') == $v['name'])
                                <a href="javascript:edit();" class="btn btn-success btn-block">默认模板</a>
                            @else
                                <a href="{{route('template.show',$v['name'])}}" class="btn btn-dark btn-block">设为默认模板</a>
                            @endif
                        </div>
                    @endforeach
                </div>
            </div>
        </div>
        {{--{{ $admins->links() }}--}}
    </div>
@stop

